import { createApp } from "vue";
import pinia from "@/stores";
import "@/assets/iconfont/iconfont.css";
// reset style sheet
import "@/styles/index.scss";
import ElementPlus from "element-plus";
// 因 element-plus 默认是英文，我们指定一下默认中文
import locale from "element-plus/es/locale/lang/zh-cn";
// 图标并进行全局注册
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import * as echarts from "echarts";
import App from "./App.vue";
import router from "@/router";
// 所有业务 api 接口
import api from "@/api";
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'

const app = createApp(App);
app.use(pinia);
app.use(VXETable);
app.use(ElementPlus, { size: 'small', zIndex: 3000 })
app.config.globalProperties.$echarts = echarts;
app.use(router);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.mount("#app");